/********************************************************************************
* @file    bsp_pwm.h
* @author  jianqiang.xue
* @version V1.0.0
* @date    2021-04-18
* @brief   NULL
********************************************************************************/

#ifndef __BSP_PWM_H
#define __BSP_PWM_H

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>

/* Public enum ---------------------------------------------------------------*/
typedef enum {
    BSP_PWM_0 = 0,
    BSP_PWM_1,
    BSP_PWM_2,
    BSP_PWM_3,
    BSP_PWM_4,
    BSP_PWM_5,
    BSP_PWM_6,
    BSP_PWM_7,
    BSP_PWM_8,
    BSP_PWM_9,
    BSP_PWM_10,
    BSP_PWM_11,
    BSP_PWM_MAX
} bsp_pwm_t;

/* Public Function Prototypes ------------------------------------------------*/
uint8_t bsp_pwm_set_pulse(bsp_pwm_t pwmx, uint16_t val);
uint16_t bsp_pwm_get_pulse(bsp_pwm_t pwmx);
uint16_t bsp_pwm_pp_to_pulse(bsp_pwm_t pwmx, uint8_t pp);
#endif
